package org.bsplus.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.user.client.ui.Widget;

public class SetCentreComponentEvent extends
		GwtEvent<SetCentreComponentEventHandler>
{
	public static final Type<SetCentreComponentEventHandler> TYPE = new Type<SetCentreComponentEventHandler>();

	private final Widget widget;

	public SetCentreComponentEvent(Widget widget)
	{
		this.widget = widget;
	}

	@Override
	public Type<SetCentreComponentEventHandler> getAssociatedType()
	{
		return TYPE;
	}

	@Override
	protected void dispatch(SetCentreComponentEventHandler handler)
	{
		handler.setCenterComponent(this);
	}

	public Widget getWidget()
	{
		return widget;
	}
}
